Optimal. Leaf size=42 \[ \frac{1}{2} x (a-2 b)-\frac{a \sin (e+f x) \cos (e+f x)}{2 f}+\frac{b \tan (e+f x)}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0438048, antiderivative size = 42, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {4132, 455, 388, 203} \[ \frac{1}{2} x (a-2 b)-\frac{a \sin (e+f x) \cos (e+f x)}{2 f}+\frac{b \tan (e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4132
Rule 455
Rule 388
Rule 203
Rubi steps
\begin{align*} \int \left (a+b \sec ^2(e+f x)\right ) \sin ^2(e+f x) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^2 \left (a+b+b x^2\right )}{\left (1+x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{a \cos (e+f x) \sin (e+f x)}{2 f}-\frac{\operatorname{Subst}\left (\int \frac{-a-2 b x^2}{1+x^2} \, dx,x,\tan (e+f x)\right )}{2 f}\\ &=-\frac{a \cos (e+f x) \sin (e+f x)}{2 f}+\frac{b \tan (e+f x)}{f}+\frac{(a-2 b) \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{2 f}\\ &=\frac{1}{2} (a-2 b) x-\frac{a \cos (e+f x) \sin (e+f x)}{2 f}+\frac{b \tan (e+f x)}{f}\\ \end{align*}
Mathematica [A] time = 0.096271, size = 54, normalized size = 1.29 \[ \frac{a (e+f x)}{2 f}-\frac{a \sin (2 (e+f x))}{4 f}-\frac{b \tan ^{-1}(\tan (e+f x))}{f}+\frac{b \tan (e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.038, size = 46, normalized size = 1.1 \begin{align*}{\frac{1}{f} \left ( a \left ( -{\frac{\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) }{2}}+{\frac{fx}{2}}+{\frac{e}{2}} \right ) +b \left ( \tan \left ( fx+e \right ) -fx-e \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.48669, size = 63, normalized size = 1.5 \begin{align*} \frac{{\left (f x + e\right )}{\left (a - 2 \, b\right )} + 2 \, b \tan \left (f x + e\right ) - \frac{a \tan \left (f x + e\right )}{\tan \left (f x + e\right )^{2} + 1}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.477747, size = 123, normalized size = 2.93 \begin{align*} \frac{{\left (a - 2 \, b\right )} f x \cos \left (f x + e\right ) -{\left (a \cos \left (f x + e\right )^{2} - 2 \, b\right )} \sin \left (f x + e\right )}{2 \, f \cos \left (f x + e\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec ^{2}{\left (e + f x \right )}\right ) \sin ^{2}{\left (e + f x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15883, size = 69, normalized size = 1.64 \begin{align*} \frac{{\left (f x + e\right )}{\left (a - 2 \, b\right )} + 2 \, b \tan \left (f x + e\right ) - \frac{a \tan \left (f x + e\right )}{\tan \left (f x + e\right )^{2} + 1}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]